# -*- coding: utf-8 -*-
# @Time    : 2024/9/6 下午5:14
# @Author  : liujun
# @Email   : 2592730854@qq.com
# @File    : release_breakfast_details_page.py
# @Software: PyCharm



from appium.webdriver.common.appiumby import AppiumBy as By

class ReleaseBreakfastDetailsPage:
    """早餐详情页面"""

    #鸡蛋
    egg_locator=(By.XPATH,'//android.view.View[@content-desc="鸡蛋(煮) 热量 143 千卡 / 100 克 碳水 0.1 克 / 100 克"]')

    #点击确定
    sure_btn_locator=(By.XPATH,'//android.view.View[@content-desc="确定"]')


    #完成
    finish_btn_locator=(By.XPATH,'//android.view.View[@content-desc="完成"]')


    def __init__(self, driver):
        self.driver = driver


    def click_egg(self):  # 点击鸡蛋
        self.driver.find_element(*self.egg_locator).click()

    def click_sure(self):  # 点击确定
        self.driver.find_element(*self.sure_btn_locator).click()

    def click_finish_btn(self):  #点击完成
        self.driver.find_element(*self.finish_btn_locator).click()
